package com.zh.kotlin_mvvm.pinyin;

import java.util.Comparator;

public class LettersPinyinComparator implements Comparator<String> {

    public int compare(String o1, String o2) {
        //根据ABCDEFG...来排序
        if (o1.equals("#")) {
            return 1;
        } else if (o2.equals("#")) {
            return -1;
        } else {
            return o1.compareTo(o2);
        }
    }
}
